home *** CD-ROM | disk | FTP | other *** search
- #include <stdlib.h>
- #include "prn_form.h"
-
- char* printMenuList[] = { " Epson 9", " Epson 24", "Laser ", "" };
- char* densityMenuList[] = { " Double", " Quadruple",
- " LJ 100 ", " LJ 150", "" };
- char* paperMenuList[] = { " Yes", " No", "" };
-
- char* hotPrintList = "GCK";
- char* hotDensityList = "LX";
- char* hotPaperList = "LY";
-
- int s = pScreenSet->g_driver == VGA ? 0 : 1;
- rect r_print = rect(31, 5, 47, 13);
- rect r_density = rect(48, 5, 72, 13 + s);
- rect r_paper = rect(31, 14, 44, 18);
-
-
- void Form::Form() : Bl(rect(30, 3, 73, 24), "",
- " button Print - Yes, ESC - No ", 6,
- FIXED, SHOW_BORDER, SHOW_BORDER, 47, 16, 16)
- {
- printer_type = new
- TextMenu(r_print, "", " Printer ", hotPrintList, 1, 1,
- printMenuList, rect(0, 24, 79, 25), 0, NULL, NULL,
- FIXED, 3, STANDART_BORDER, STANDART_BORDER, 16, 16);
-
- density = new TextMenu(r_density, "", " Density ", hotDensityList,
- 1, 1, densityMenuList, rect(0, 24, 79, 25), 0, NULL, NULL,
- FIXED, 3, STANDART_BORDER, STANDART_BORDER, 16, 16);
- paper = new TextMenu(r_paper, "", "Sensor", hotPaperList, 1, 1,
- paperMenuList, rect(0, 24, 79, 25), 0, NULL, NULL,
- FIXED, 3, STANDART_BORDER, STANDART_BORDER, 16, 16);
- pass = new CaptureEditLine(loc(45, 15), 3, " Pass. ", C_RIGHT);
- lt = new CaptureEditLine(loc(59, 15), 4, " Left.", C_RIGHT);
- mx = new CaptureEditLine(loc(45, 16), 3, " Mult X", C_RIGHT);
- my = new CaptureEditLine(loc(59, 16), 3, " Mult Y", C_RIGHT);
- dx = new CaptureEditLine(loc(45, 17), 3, " Div X ", C_RIGHT);
- dy = new CaptureEditLine(loc(59, 17), 3, " Div Y ", C_RIGHT);
- copies = new CaptureEditLine(loc(45, 18), 3, " Copy ", C_RIGHT);
- pass->put_string("1");
- lt->put_string("0"); mx->put_string("1"); my->put_string("1");
- dx->put_string("1"); dy->put_string("1");
- copies->put_string("1");
- go = new Button(rect(46, 21, 58, 22),
- "P R I N T", BUTTON_BORDER, 16);
-
- go->set_ret(RET_OK | RET_MOUSE | RET_CANCEL);
- insert(paper, 1); insert(lt, 1); insert(copies, 1); insert(dy, 1);
- insert(dx, 1); insert(my, 1); insert(mx, 1); insert(pass, 1);
- insert(density, 1); insert(printer_type, 1);
- insert(go, 1);
- assign(printer_type, cancel_element, AC_CANCEL);
- printer_type->set_ret(RET_CANCEL);
- }
- /////////////////////////
- void Form::exe(int act)
- {
- Bl::exe(act);
- p_t = printer_type->get_choice();
- d = density->get_choice();
- pap = paper->get_choice();
- l = atoi(lt->get_string());
- pas = atoi(pass->get_string());
- m_x = atoi(mx->get_string());
- m_y = atoi(my->get_string());
- d_x = atoi(dx->get_string());
- d_y = atoi(dy->get_string());
- cop = atoi(copies->get_string());
- global_num = 1;
- mouseHideCursor();
- }
-